package com.anjubao.parking.municipal.common.entity;

import java.time.LocalDateTime;

import com.anjubao.parking.municipal.common.utils.U;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;

/**
 * Entity基类
 * 
 * @author Atom.z
 *
 */
public abstract class BaseEntity<T extends Model<?>> extends Model<T> {
	/**
	 * 
	 */
	private static final long serialVersionUID = 7629264978434061597L;
	@TableField(fill = FieldFill.INSERT)
	protected LocalDateTime createTime;
	@TableField(fill = FieldFill.INSERT)
	protected String createdBy;
	@TableField(fill = FieldFill.INSERT_UPDATE)
	protected LocalDateTime updateTime;
	@TableField(fill = FieldFill.INSERT_UPDATE)
	protected String updatedBy;

	public LocalDateTime getCreateTime() {
		return createTime;
	}

	public void setCreateTime(LocalDateTime createTime) {
		this.createTime = createTime;
	}

	public String getCreatedBy() {
		return createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public LocalDateTime getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(LocalDateTime updateTime) {
		this.updateTime = updateTime;
	}

	public String getUpdatedBy() {
		return updatedBy;
	}

	public void setUpdatedBy(String updatedBy) {
		this.updatedBy = updatedBy;
	}

	@Override
	public String toString() {
		return U.json(this);
	}
}
